<?php
/**
 * Created by PhpStorm.
 * User: 29620
 * Date: 2021/11/24
 * Time: 9:01
 */
namespace app\admin\controller;

use app\BaseController;
use think\facade\Request;
use think\facade\View;

class Brand extends BaseController
{
    public function brandList()
    {
        $param = Request::param();
        $where = [];
        if(isset($param['keywords']) && $param['keywords']<>'')  $where['keywords'] = $param['keywords'];
        //推荐
        if (isset($param['recommended']) && $param['recommended']<>'')    $where['recommended'] = $param['recommended'];
        //显示
        if (isset($param['if_show']) && count($param['if_show'])==1)    $where['if_show'] = $param['if_show'];
        //有图无图
        if (isset($param['brand_logo']) && count($param['brand_logo'])==1)    $where['brand_logo'] = $param['brand_logo'][0];


        $info = \app\admin\model\Brand::getBrand($where,$param);
        View::assign('info',$info);
        return view('',$where);
    }

    public function brandAdd()
    {
        return view();
    }

    public function brandEdit()
    {
        return view();
    }
}